{extend name="public:base"/}


{block name="title"}编辑商品库表{/block}
{block name="style"}
<link href="__STATIC__/admin/plugin/my_uploader/css/uploads.css" rel="stylesheet">
{/block}

{block name="main"}

<section class="content" xmlns="http://www.w3.org/1999/html">
    <div class="row">

        <div class="col-md-12">

            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">编辑商品库表</h3>
                        </div>
                        <form  id="pt_form" method="post">
                            <div class="box-body">

                                <input type="hidden" name="id" value="<?=$model['id']?>" ?>
                                <div class="clearfix"></div>

     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="product_name" class="control-label Validform_label" >产品名称</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="product_name" class="form-control" name="product_name" placeholder="请输入产品名称" value="<?=$model['product_name']?>" datatype="s2-200" errormsg="产品名称超出长度范围">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group " >
                                    <div class='col-sm-2 text-right'>
                                        <label class="control-label" for="cat_id">分类</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <select id="cat_id" class="form-control" name="cat_id">
                                            <option value="0">请选择分类</option>
                                            <?php if(!empty($categoryList)){foreach($categoryList as $k=>$v){?>
                                            <option <?=$v['id'] == $model['cat_id']?'selected="selected"':''?> value="<?=$v['id']?>"><?=str_repeat('|------',$v['lev'])?><?=$v['name']?></option>
                                            <?php }} ?>
                                        </select>
                                        <div class="help-block"></div>
                                    </div>
                                </div>
     
                                <div class="form-group required">
                                    <div class='col-sm-2 text-right'>
                                        <label for="figure_nu" class="control-label Validform_label" >产品图号</label>
                                    </div>
                                    <div class='col-sm-10'>
                                        <input type="text" id="figure_nu" class="form-control" name="figure_nu" placeholder="请输入产品图号" value="<?=$model['figure_nu']?>" datatype="s2-150" errormsg="产品图号超出长度范围">
                                        <div class="help-block"></div>
                                    </div>
                                </div>
          
                                <div class="form-group ">
                                    <div class='col-sm-2 text-right'>
                                        <label for="resolve" class="control-label Validform_label" >产品分解图</label>
                                    </div>
                                    <div class='col-sm-10'>

                                        <textarea style="height:600px;" name="resolve" id="resolve" datatype="*"></textarea>

                                        <div class="help-block"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="box-footer text-center">
                                <button class="btn btn-primary" type="submit">保存</button>
                                <span class="btn btn-white" onclick="history.go(-1)">返回</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{/block}

{block name="js"}
<script type="text/javascript" src="__STATIC__/admin/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/admin/plugin/ueditor/ueditor.all.js"></script>
<script>
    var ue = UE.getEditor('resolve');
    var validate = validator('#pt_form');
    
</script>
{/block}